﻿using System;
using System.Collections.Generic;
using System.Text;
using Antu.WebControls;
using WebSys.UI.Control;

namespace WebSys.UI.OfficeFlow
{
    public class InstanceSearch : MPPage
    {
        string action = "";
        protected override void OnLoad(EventArgs e)
        {
            action = Antu.Utilities.UtilitiesPage.GetStringPar("action", "").ToLower();
            LoginHelper.CheckLogin();
            base.OnLoad(e);
            InitControl();

        }

        private void InitControl()
        {
            MPContent MainerRegion = (MPContent)FindControl("MainerRegion");
            MainerRegion.Controls.Clear();
            switch (action)
            {
                case "instancesearchlist":
                    InstanceSearchListSkin isls = new InstanceSearchListSkin();
                    isls.SkinExtName = "OfficeFlow/";
                    MainerRegion.Controls.Add(isls);
                    break;
                case "instancesearchone":
                    InstanceSearchOneSkin isos = new InstanceSearchOneSkin();
                    isos.SkinExtName = "OfficeFlow/";
                    MainerRegion.Controls.Add(isos);
                    break;
                default:
                    InstanceSearchSkin iss = new InstanceSearchSkin();
                    iss.SkinExtName = "OfficeFlow/";
                    MainerRegion.Controls.Add(iss);
                    break;
            }
        }
    }
}
